﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Rabbit.Repository.Migrations
{
    public partial class log8 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "CultivationInfo",
                columns: table => new
                {
                    CIid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TMid = table.Column<int>(type: "int", nullable: false),
                    CIVariety = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CISource = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CIFeedDay = table.Column<int>(type: "int", nullable: false),
                    CIFeedVariety = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CIFeedPeople = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CIDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CultivationInfo", x => x.CIid);
                });

            migrationBuilder.CreateTable(
                name: "Dynamic",
                columns: table => new
                {
                    Did = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Durl = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    TMid = table.Column<int>(type: "int", nullable: false),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Dynamic", x => x.Did);
                });

            migrationBuilder.CreateTable(
                name: "Enterprise",
                columns: table => new
                {
                    Eid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TMid = table.Column<int>(type: "int", nullable: false),
                    EName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EPeople = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ENum = table.Column<int>(type: "int", nullable: false),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Enterprise", x => x.Eid);
                });

            migrationBuilder.CreateTable(
                name: "EnterpriseImg",
                columns: table => new
                {
                    EIid = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TMid = table.Column<int>(type: "int", nullable: false),
                    Eurl = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EnterpriseImg", x => x.EIid);
                });

            migrationBuilder.CreateTable(
                name: "Immune",
                columns: table => new
                {
                    ImmuneId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    TMid = table.Column<int>(type: "int", nullable: false),
                    ImmuneDay = table.Column<int>(type: "int", nullable: false),
                    ImmuneName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ImmuneMode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AddName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    AddDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DelName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DelDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDel = table.Column<int>(type: "int", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Immune", x => x.ImmuneId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "CultivationInfo");

            migrationBuilder.DropTable(
                name: "Dynamic");

            migrationBuilder.DropTable(
                name: "Enterprise");

            migrationBuilder.DropTable(
                name: "EnterpriseImg");

            migrationBuilder.DropTable(
                name: "Immune");
        }
    }
}
